package 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import Framework.GameManager;
	import Framework.BaseGame;
	import Games.PumpGame.PumpGame;
	import flash.events.KeyboardEvent;

	/**
	 * ...
	 * @author Menno
	 */
	[Frame(factoryClass="Preloader")]
	public class Main extends Sprite 
	{
		private var currentGame:BaseGame;
		private var gameManager:GameManager;
		public  static var main:Main;
		
		public function Main():void 
		{
			main = this;
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}

		private function init(e:Event = null):void 
		{			
			removeEventListener(Event.ADDED_TO_STAGE, init);
			
			//////
			////// TESTCODDE
			//////
			
			var game:BaseGame = new PumpGame();
			// entry point			
			gameManager = new GameManager();
		}
		
		private function loadGame():void
		{
			if (currentGame != null)
			{
				currentGame.initGame();
			}
		}

	}

}